
<template>
	<!-- 园所公告 -->
	<div>
		<el-row :gutter="10">
			<el-col :span="4">
				<el-input v-model="searchParam.keywords" placeholder="输入通知标题搜索"></el-input>
			</el-col>
			<el-col :span="4">
				<el-button @click="search(1)">搜索</el-button>
			</el-col>
			<el-col :span="12">
				
			</el-col>
		</el-row>
		<table class="table" cellspacing="0" style="width: 100%;margin-top:0.1rem;">
			<thead class="thead">
				<tr>
					<td v-if="roleMode<=2" style="width: 10%;">班级</td>
					<td style="width: 10%;">通知标题</td>
					<td style="width: 20%;">公告内容</td>
					<td style="width: 15%;">发送时间</td>
					<td style="width: 10%;">通知类型</td>
					<td style="width: 10%;">发送人</td>
					<td style="width: 10%;">状态</td>
					<td style="width: 10%;">读取情况</td>
					<td style="width: 5%;">操作</td>
				</tr>
			</thead>
			<tbody class="tbody">
				<tr v-for="(item,index) in tableList" :key="index">
					<td v-if="roleMode<=2"></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td>
						<el-button type="text" @click="visibleDetial(true)">详情</el-button>
					</td>
				</tr>
			</tbody>
		</table>
		<el-row>
			<el-pagination
				class="page"
				layout="total, sizes, prev, pager, next, jumper"
				:current-page="searchParam.currPage"
				@size-change="pageSizeChange"
				@current-change="curPageChange"
				:total="searchParam.total"
			></el-pagination>
		</el-row>

		<el-dialog
			:title="noticeDetialPopup.title"
			:visible.sync="noticeDetialPopup.visible"
			width="40%">
			<noticeDetial></noticeDetial>
		</el-dialog>
		
	</div>
</template>

<script>
	let vm;
	import noticeDetial from './notice_detials'
	export default{
		components:{noticeDetial},
		data(){
			return {
				roleMode:this.$store.state.roleMode,
				searchParam:{
					type:'1',
					keywords:'',
					currPage:1,
					pageSize:1,
					total:0
				},
				tableList:[{}],
				noticeDetialPopup:{
					visible:false,
					title:'公告详情',
				},
			}
		},
		methods:{
			campusChange : function(campusId) { //校区改变
				
			},
			init(){

			},
			pageSizeChange(val){
				this.searchParam.pageSize=val;
				this.search(1);
			},
			curPageChange(val){
				this.search(val);
			},
			search(pIndex){
				this.searchParam.currPage=pIndex||this.searchParam.currPage;

			},
			visibleDetial(val){
				this.noticeDetialPopup.visible=val;
			},
		},
		mounted(){
			// console.log(this.roleMode)
		},
		computed:{
			
		},
		watch:{

		}
	}
</script>

<style lang="scss" scoped>
	

	/*自定义滚动条样式*/
	// .box-tasks::-webkit-scrollbar {
	// 	// height: 0.08rem;
	// 	width: 0.05rem;
	// }
	// .box-tasks::-webkit-scrollbar-thumb {
	// 	border-radius: 0.5rem;
	// 	background: #BBBBBB;
	// }
	// .box-tasks::-webkit-scrollbar-track {
	// 	background: rgba(242, 246, 252, 0);
	// }	

	
</style>
<style scoped src="@/style/module/table.css"></style>